package com.open.fei.listener;

import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * 顺序获取生产者msg
 * @author zhaoYuFei
 */
@Component
@RocketMQMessageListener(topic = "powernodes",
        consumerGroup = "MoreMsg",
        consumeMode = ConsumeMode.ORDERLY
)
public class MoreMsgListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        System.out.println(s);
    }
}
